﻿Public Class Conversiones
    Public Shared Function getDataValue(ByVal value As Object) As Object
        If (value = Nothing) Then
            Return DBNull.Value
        End If
        Return value
    End Function

    Public Shared Function convertSNToBool(ByVal sValor As String) As Boolean
        Select Case sValor
            Case "S"
                Return True
            Case "N"
                Return False
            Case Else
                Return False
        End Select
    End Function

    Public Shared Function convertBoolToSN(ByVal svalor As Boolean) As String
        If (svalor) Then
            Return "S"
        Else
            Return "N"
        End If
    End Function

End Class
